<html>
<head>
	<meta charset="UTF-8"/>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<title>吃货餐厅</title>
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5/themes/metro/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5/themes/mobile.css"/>
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5/themes/icon.css"/>
	<script type="text/javascript" src="js/jquery-easyui-1.5/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery-easyui-1.5/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="js/jquery-easyui-1.5/jquery.easyui.mobile.js"></script>
    
<style type="text/css">
	.RED
	{
		background: #eee;
	}
</style>

    <script type="text/javascript">
	 /*<![CDATA[*/ 
	$(document).ready(  
			  function(){
				  
				  
				 
	 });
	 
	function show(obj) 
	{
		//alert(obj);
		$(obj).removeClass('RED');
	} 

	 function clk(obj)
	 {
		         $(obj).toggleClass('RED');
		         setTimeout(function(){show(obj);}, 100);
	 }
	 
	 function showchar(obj)
	 {
		 
		 $(obj).toggleClass('RED');
         setTimeout(function(){show(obj);}, 100);
         
         var deskid=$("#deskid").val();
         
         var url ="p_showCar?&deskid="+deskid;
 		 window.location.href=url;
	 }
	 
	 function showChat(obj)
	 {
		 
		 $(obj).toggleClass('RED');
         setTimeout(function(){show(obj);}, 100);
         
         var deskid=$("#deskid").val();
         
         var url ="p_showChat?&deskid="+deskid;
 		 window.location.href=url;
	 }
	 
	 
     
	 
	function formatterCloumn(value)
	{
	
        return '<a href\'javascript:void(0)\' class=\'datalist-link\'>' + value + '</a>';
        
	}
	
	function clickrow(obj)
	{
		var deskid=$("#deskid").val();
		var id = $(obj).attr("id");
		var url ="p_foodListGroup?id="+id+"&deskid="+deskid;
		window.location.href=url;
    }
	
	function toSearch()
	{
		var deskid=$('#deskid').val();
		 var url ="p_search?&deskid="+deskid;
 		 window.location.href=url;
	}
	 
	/*]]>*/  
	</script>
	
</head>
<body>
	<div class="easyui-navpanel">
        <header>
            <div class="m-toolbar">
                <div class="m-title"><span th:text="${desknum}+'号桌'"/></div>
                 <div class="m-right">
                    <!-- <a href="#" onclick="toSearch()"><img src="img/search.jpg" width="25px" height="25px"/></a>  -->
                    <!--<a href="#"  onclick="toSearch()" class="easyui-linkbutton m-next" plain="true" outline="true" >搜索</a>-->
                	<a href="javascript:void(0)" class="easyui-linkbutton" plain="true"  onclick="toSearch()">搜&nbsp;&nbsp;索</a>
                	
                </div>
                
                <div class="m-right" id="order">
                </div>
            </div>
        </header>
		<ul class="easyui-datalist" 
        		data-options="fit: true,lines: true,border: false,textFormatter:formatterCloumn">
           <div th:each="foodtype,iterStat:${list}" >
           		<li th:id="${foodtype.id}" onclick="clickrow(this)" style="list-style-type:none;">
           			<span style="font-size: 30px;font-family:'微软雅黑';"  th:text="${foodtype.typename}" ></span>
           		</li>
           </div>
        </ul>
		
		 <footer height="40px">
           <table width="100%" height="40px" id="tb">
           	<tr>
           		<td onclick="clk(this)" style="border-right:1px solid #F00;border-color: #ebebeb;" align="center">首页</td>
           		<td onclick="showchar(this)" style="border-right:1px solid #F00;border-color: #ebebeb;" align="center">购物车</td>
           		<td onclick="showChat(this)" align="center">客服</td>
           	</tr>
           </table>
        </footer>
        
	</div>
	<input  id="deskid" type="hidden" th:value="${deskid}" />
</body>
</html>